﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using ifunction.JPush.V3;

namespace ifunction.JPush
{
    /// <summary>
    /// Class PushMessageLog.
    /// </summary>
    [DataContract]
    [KnownType(typeof(PushResponse))]
    [KnownType(typeof(Audience))]
    public class PushMessageLog
    {
        /// <summary>
        /// Gets or sets the key.
        /// </summary>
        /// <value>The key.</value>
        [DataMember]
        public Guid Key { get; set; }

        /// <summary>
        /// Gets or sets the message identifier.
        /// </summary>
        /// <value>The message identifier.</value>
        [DataMember]
        public string MessageId { get; set; }

        /// <summary>
        /// Gets or sets the notification.
        /// </summary>
        /// <value>The notification.</value>
        [DataMember]
        public Notification Notification { get; set; }

        /// <summary>
        /// Gets or sets the application message.
        /// </summary>
        /// <value>The application message.</value>
        [DataMember]
        public AppMessage AppMessage { get; set; }

        /// <summary>
        /// Gets or sets the platform.
        /// </summary>
        /// <value>The platform.</value>
        [DataMember]
        public PushPlatform Platform { get; set; }

        /// <summary>
        /// Gets or sets the receiver value.
        /// </summary>
        /// <value>The receiver value.</value>
        [DataMember]
        public Audience Audience { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is test.
        /// For iOS only.
        /// Default: false.
        /// </summary>
        /// <value><c>true</c> if this instance is test; otherwise, <c>false</c>.</value>
        [DataMember]
        public bool IsTestEnvironment { get; set; }

        /// <summary>
        /// Gets or sets the response code.
        /// </summary>
        /// <value>The response code.</value>
        [DataMember]
        public PushResponseCode ResponseCode { get; set; }

        /// <summary>
        /// Gets or sets the response message.
        /// </summary>
        /// <value>The response message.</value>
        [DataMember]
        public string ResponseMessage { get; set; }

        /// <summary>
        /// Gets or sets the android delivered count.
        /// </summary>
        /// <value>The android delivered count.</value>
        [DataMember]
        public int? AndroidDeliveredCount { get; set; }

        /// <summary>
        /// Gets or sets the apple push notification delivered count.
        /// </summary>
        /// <value>The apple push notification delivered count.</value>
        [DataMember]
        public int? ApplePushNotificationDeliveredCount { get; set; }

        /// <summary>
        /// Gets or sets the windows phone delivered count.
        /// </summary>
        /// <value>The windows phone delivered count.</value>
        [DataMember]
        public int? WindowsPhoneDeliveredCount { get; set; }

        /// <summary>
        /// Gets or sets the created stamp.
        /// </summary>
        /// <value>The created stamp.</value>
        [DataMember]
        public DateTime CreatedStamp { get; set; }

        /// <summary>
        /// Gets or sets the last updated stamp.
        /// </summary>
        /// <value>The last updated stamp.</value>
        [DataMember]
        public DateTime LastUpdatedStamp { get; set; }
    }
}
